<%--
  Created by IntelliJ IDEA.
  User: asus
  Date: 2021/5/17
  Time: 20:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>学生列表</title>
</head>
<body>
 <div>
    <h1>学生列表</h1>
     <a href="/add.jsp">添加学生</a>
     <table border="1" cellspacing="0" cellpadding="0" align="center" width="800px">
         <tr>
             <th>学号</th>
             <th>姓名</th>
             <th>年龄</th>
             <th>操作</th>
         </tr>
         <c:forEach items="${students}" var="studnet">
        <tr>
            <td>${student.id}</td>
            <td>${studnet.name}</td>
            <td>${studnet.age}</td>
            <td><a href="/deleteServlet?id=${studnet.id}">删除</a> <a href="/toUpdateServlet?id=${studnet.id}">修改</a> </td>
        </tr>
         </c:forEach>
     </table>

 </div>

</body>
</html>
